/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ufps.cuatro.util.generadores.codeobject;

/**
 *
 * @author CATC
 */
public class CodeContextComment extends CodeContext{
    
    private EnumComment eComment;
    private String strComment;

    public CodeContextComment(EnumComment eComment, String strComment) {
        this.eComment = eComment;
        this.strComment = strComment;
    }

    @Override
    public String toString() {
        return strComment;
    }
    
    public String getDefinicion(Object obj) {
       try{
        if(eComment == EnumComment.eCommentSingleLine){
            return "//" + strComment;
        }
        else if(eComment == EnumComment.eCommentMultiLine){
            return "/*" + NEWL + RETC + TABH + strComment + NEWL + "*/";
        }
        else if(eComment == EnumComment.eCommentJavaDoc){
            return "/**" + NEWL + RETC + TABH + strComment + NEWL + "*/";
        }
        return "/*" + NEWL + RETC + TABH + strComment + NEWL + "*/";
    }catch(java.lang.NullPointerException ex){}
       return "";
    }
}
